package com.hy.mydesktop.client.rpcModel;

import java.util.Date;
import java.util.UUID;

import com.extjs.gxt.ui.client.data.BaseModel;
import com.google.gwt.user.client.rpc.IsSerializable;


public class RPCBaseModel extends BaseModel implements IsSerializable{

	
	
	
	
	/**
	 * <ul>
	 * <li>开发作者：花宏宇</li>
	 * <li>设计日期：2010-12-16；时间：上午10:39:35</li>
	 * <li>字段类型：long；字段名称：serialVersionUID</li>
	 * <li>设计目的：</li>
	 * </ul>
	 * <ul>
	 * <b>修订编号：</b>
	 * <li>修订日期：</li>
	 * <li>修订作者：</li>
	 * <li>修订原因：</li>
	 * <li>修订内容：</li>
	 * </ul>
	 */
	private static final long serialVersionUID = -786237884973872598L;
	public RPCBaseModel() {
		
	}
	public RPCBaseModel(String name, String age) {
		setName(name);
		setAge(age);
//		setIdentifier( UUID.randomUUID().toString());
		setIdentifier( name );
	}
	
	public String getName() {
		return get("name");
	}
	public void setName(String name) {
		set("name", name);
		set("NAME", name);
		set("DESCRIPTION", name);
		set("DEPOTNAME", name);
		set("BECOMEFFECTIVE", true);
		set("LOSSSTOCK", true);
		set("FAILUREDATE", new Date());

	}
	
	public String getAge() {
		return get("age");
	}
	public void setAge(String age) {
		set("age", age);
	}
	
	public String getIdentifier() {
		return get("identifier");
	}
	public void setIdentifier(String identifier) {
		set("identifier", identifier);
	}
}
